package com.itheima.order.controller;

import com.itheima.order.domain.po.Order;
import com.itheima.order.domain.vo.OrderVo;
import com.itheima.order.service.IOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/order")
public class OrderController {

    @Autowired
    private IOrderService orderService;

    @GetMapping
    public OrderVo getOrder(@RequestParam("id") Long id) {
        return orderService.getOrder(id);
    }
}
